<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>欢迎登陆无线热点网络</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
    <link href="css/body.css" rel="stylesheet">
    <script src="../js/jquery.min.js"></script>
  </head>

  <body>
    <div class="masthead">
        <div class="navbar">
          <div class="navbar-inner">
            <div class="container">
              <ul class="nav">
                <li><a href="http://www.baidu.com">登陆网络</a></li>
                <li class="active"><a href="#">注册账号</a></li>
                <li><a href="help.php">帮助系统</a></li>
              </ul>
            </div>
          </div>
        </div><!-- /.navbar -->
      </div>

    <!-- Carousel
    ================================================== -->
    <div class="span7">
    <div id="myCarousel" class="carousel slide">
      <div class="carousel-inner">
        <div class="item active">
          <img src="admin/server/php/files/01.jpg" alt="">
          <div class="container">
            <div class="carousel-caption">
            </div>
          </div>
        </div>
        <div class="item">
          <img src="admin/server/php/files/02.jpg" alt="">
          <div class="container">
            <div class="carousel-caption">
            </div>
          </div>
        </div>
        <div class="item">
          <img src="admin/server/php/files/03.jpg" alt="">
          <div class="container">
            <div class="carousel-caption">
            </div>
          </div>
        </div>
        <div class="item">
          <img src="admin/server/php/files/04.jpg" alt="">
          <div class="container">
            <div class="carousel-caption">
            </div>
          </div>
        </div>
        <div class="item">
          <img src="admin/server/php/files/05.jpg" alt="">
          <div class="container">
            <div class="carousel-caption">
            </div>
          </div>
        </div>
      </div>
      <a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
      <a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a>
    </div><!-- /.carousel -->
    </div>

<?php
// 处理注册

if(isset($_POST['phone']) && strlen($_POST['phone']) == 11)
{
	include realpath(dirname(__FILE__))."/../radiusapi/client.php";
	$phone = $_POST['phone'];
	$username = rand(10000000,99999999);
	$password = "123456";	
	radius_add_user($username,$password,"",$phone);
	send_message("$phone","您的账号是: ".$username);
}

?>

    <div class="span5">
      <form class="form-signin" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >
        <h2 class="form-signin-heading">登录热点网络</h2>
	<span name="register_hint"></span>
        <input type="text" class="input-block-level" placeholder="请输入您的手机号" name="phone" value="<?php if(isset($phone)) echo "请等候短信:".$phone; ?>">
     <!--   <input type="password" class="input-block-level" placeholder="请输入您的密码">
        <input type="password" class="input-block-level" placeholder="请再次输入您的密码"> -->
        <button class="btn btn-large btn-primary" type="submit" id="phone_submit" >注册</button>
      </form> 
    </div>

    <!-- Marketing messaging and featurettes
    ================================================== -->
    <!-- Wrap the rest of the page in another container to center all the content. -->

    <div class="container marketing">

      <!-- Three columns of text below the carousel -->
      <div class="row">
        <div class="span5">
          <h2>注意</h2>
          <p>1、请注意保管好您的密码。
           <br> 
             2、如需帮助请联系客服。
          </p>
          <p><a class="btn" href="help.php">更多帮助</a></p>
        </div><!-- /.span4 -->
      </div><!-- /.row -->


      <!-- START THE FEATURETTES -->

      <hr class="featurette-divider">


      <!-- /END THE FEATURETTES -->


      <!-- FOOTER -->
      <footer>
        <p>&copy; 2013 Company, Inc. &middot; <a href="#">隐私保护</a> &middot; <a href="#">条款</a></p>
      </footer>

    </div><!-- /.container -->



    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script>
      !function ($) {
        $(function(){
          // carousel demo
          $('#myCarousel').carousel()
        })
      }(window.jQuery)
    </script>
    <script src="js/holder.js"></script>
  </body>
</html>


